package com.hyfrogx.modules.sys.form.dict.detail;

import com.hyfrogx.common.validator.group.AddGroup;
import com.hyfrogx.common.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 字典详情新增表单
 * </p>
 *
 * @author wanglei
 * @date 2019-07-15 15:51:11
 */
@Data
@ApiModel(value = "字典详情新增表单")
public class DictDetailSaveForm implements Serializable {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "字典Id")
	@NotNull(message = "字典Id不能为空", groups = {AddGroup.class, UpdateGroup.class})
	private Long dictId;

	@ApiModelProperty(value = "详情名称")
	@NotNull(message = "详情名称不能为空", groups = {AddGroup.class, UpdateGroup.class})
	@Length(max = 20, message = "详情名称不能超过{max}个字符", groups = {AddGroup.class, UpdateGroup.class})
	private String name;

	@ApiModelProperty(value = "详情编码")
	@NotNull(message = "详情编码不能为空", groups = {AddGroup.class, UpdateGroup.class})
	@Length(max = 50, message = "详情编码不能超过{max}个字符", groups = {AddGroup.class, UpdateGroup.class})
	private String code;

	@ApiModelProperty(value = "排序")
	private Integer orderNum;

	@ApiModelProperty(value = "Tree结构的父Id")
	private Long pid;

	@Length(max = 20, message = "级别不能超过{max}个字符", groups = {AddGroup.class, UpdateGroup.class})
	@ApiModelProperty(value = "级别")
	private String level;

}
